query builder not in laravel

106

query builder "not in" laravel -

$result = Exams::whereNotIn('id', function($q){
        $q->select('examId')->from('testresults');
    })->get();

Comments

Submit
0 Comments